package org.pine.controller;

import org.pine.importxml.Hello;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName HelloController
 * @Description:TODO
 * @Author liucs
 * @Date 2021-01-27
 * @Version V1.0
 */
@RestController
public class HelloController {
    @Autowired
    Hello hello;

    @GetMapping("/hello")
    public String hello1(){
        System.out.println("get Hello instance:"+hello+"\t"+hello.getClass());
        return hello.sayHello("罗贯中");
    }
    @GetMapping("/hello2")
    public String hello2() {
        return "hello2";
    }

    /**
     * 自定义首页
     * @return

    @RequestMapping("/index")
    public String hello(){
        System.out.println("jump to index page");
        return "index";
    }*/
}
